const express = require("express")
const app = express()
const cors = require('cors')

const coupon = require('./router/coupon')
const user = require('./router/user')
const house = require('./router/house')
const collect = require('./router/collect')
const goods = require('./router/goods')
const list = require('./router/list')
const gwc = require('./router/gwc')


//  npm i body-parser --save  用来post传参
var bodyParser = require('body-parser');
// parse application/x-www-form-urlencoded
app.use(bodyParser.urlencoded({ extended: false }));

// parse application/json
app.use(bodyParser.json());



app.use(cors())
app.use(user)
app.use(coupon)
app.use(house)
app.use(collect)
app.use(goods)
app.use(list)
app.use(gwc)


app.listen(3000,()=>{
    console.log("服务器已启动")
})






